package com.xinlu.common.game.action;

import com.xinlu.common.game.form.TdyeForm;
import com.xinlu.derek.common.BaseAction;
import com.xinlu.derek.common.BaseForm;
import com.xinlu.persistence.Users;
import com.xinlu.user.bo.UsersBo;

public class TdyeAction extends BaseAction {

	private UsersBo usersBo;

	TdyeForm fr = new TdyeForm();

	public void setUsersBo(UsersBo usersBo) {
		this.usersBo = usersBo;
	}

	public void setFr(TdyeForm fr) {
		this.fr = fr;
	}

	@Override
	public String doExecute() throws Exception {
		return null;
	}

	@Override
	public void formInit() {
	}

	@Override
	public BaseForm getModel() {
		return fr;
	}

	/**
	 * 加载页面
	 * 
	 * @return
	 */
	public String loadPage() {
		Users crtUser = (Users) getSession().getAttribute("userinfo");
		fr.setTdye(usersBo.getTdye(crtUser));
		if (fr.getTdye() == null) {
			fr.setTdye(0D);
		}
		return "tdye";
	}
}